<?php
use yii\helpers\Html;

use app\models\InsuranceBenifit;
?>
<div>Request XML:</div>
<div><?= Html::encode($request) ?></div>
<div>RETURN XML:</div>

<div class="container-fluid">
<?php foreach ($x['Body']['BenefitList']['Benefit'] as $pl) {?>
	<div><?= $pl['BenefitCode'] ?> <?= $pl['BenefitNameZHS'] ?> <?= $pl['SumInsured'] ?></div>
<?php 
$d= new InsuranceBenifit();
$d->plan_code = $plan_code;
$d->benifit_code = $pl['BenefitCode'];
$d->benifit_name = $pl['BenefitNameZHS'];
$d->benifit_amount = $pl['SumInsured'];
// $d->save();

} ?>
</div>